fix(cli): use canonical environment names in hud init - #615
Open
solvemproblr wants to merge 1 commit into
Open
Conversation
solvemproblr
force-pushed
the
asa/fix-sdk-env-sync-display
branch
from
August 25, 2026 12:34
6eda135 to
0826f33
Compare
solvemproblr
marked this pull request as ready for review
August 25, 2026 12:35
solvemproblr
force-pushed
the
asa/fix-sdk-env-sync-display
branch
from
August 25, 2026 13:03
0826f33 to
1e975a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
hud init my-envgeneratedEnvironment(name="my_env")while the package and deployed registry usedmy-env. The mismatch caused tasks to reference a registry name that did not exist.Solution
Use the SDK's canonical environment-name normalization when generating
env.py, so both names remainmy-env.Tests
uv run --extra dev pytest -q hud/cli/tests/test_init.pyty check hud/cli/init.pyNote
Low Risk
Only affects newly generated local scaffolds from
hud init; no auth, sync, or runtime behavior changes in this diff.Overview
hud initno longer derives environment names with a local underscore slugifier. Local blank scaffolds now call sharednormalize_environment_nameon the target directory name, so generatedenv.pyuses the same hyphenated, registry-style spelling (e.g.my-cool-envinstead ofmy_cool_env).The inline
_python_namehelper was removed in favor of that shared utility.test_initexpectations were updated to match the hyphenatedEnvironment(name=...)in the scaffold output.Reviewed by Cursor Bugbot for commit 1e975a1. Bugbot is set up for automated code reviews on this repo. Configure here.